import axios from "axios";
const baseURL = "https://api.aslegou.top/api";
const request = axios.create({
  baseURL,
  timeout: 5000,
});
// 1.请求拦截器
request.interceptors.request.use(
  function (config) {
    return config;
  },
  function (error) {
    return Promise.reject(error);
  }
);
// 2.响应拦截器
request.interceptors.response.use(
  function (response) {
    return response;
  },
  function (error) {
    return Promise.reject(error);
  }
);
export default request;